#pip install flask-wtf
import wtforms
from wtforms.validators import length,email

class LoginForm(wtforms.Form):
    #validators为验证器，并设置邮箱最小长度为5，最大长度为6
    email=wtforms.StringField(validators=[length(min=5,max=20),email()])
    password=wtforms.StringField(validators=[length(min=6,max=20)])